package com.lucaswangdev.strategy;

import com.lucaswangdev.Entity;

import java.util.Arrays;
import java.util.List;

public class ModifyUrgencyStrategy  implements ChangeStrategy {
    @Override
    public boolean hasChanged(Entity requestEntity, Entity dbEntity) {
        return requestEntity.isUrgent() != dbEntity.isUrgent();
    }

    @Override
    public void handleChange() {
        // 模拟生成并发送消息的必要参数
        String secret = "urgentSecret";
        String token = "urgentToken";
        List<String> userList = Arrays.asList("user1", "user2");
        String messageContent = "Urgency status has been updated.";

        // 打印消息内容（模拟发送）
        System.out.printf("===> Sending message to %s with content: %s%n", userList, messageContent);
    }
}